class BreakIt(Exception):
    pass


for i in range(1, 1 + 9 + 5):
    try:
        if i > 9:
            raise BreakIt
        for j in range(1, 1 + i + 5):
            if j > i:
                break
            print(f'{i:2d} x {j:2d} = {i * j:2d}', end=' ')
    except BreakIt:
        break
    finally:
        print()
